Runs on 68000-based Macs and is accelerated for PowerMacintosh
Background
Netscape Communications's Netscape 1.1b1 web browser supports the capability to draw "animated" graphics from gif files. Their demo page has a simple example of their Mozilla character rising from the horizon and breathing fire. I wanted to support this similar animation from MacHTTP (soon be WebSTAR, I think.) I took John O'Fallon's shell for building CGIs and the ANSI C code Netscape provided and I made GIFserv.
Purpose
GIFserv receives, from a direct argument in HTTP, a folder to scan for GIF files. It doesn't care about filenames, but the file types must be Macintosh GIF (type=GIFf). It will open the files alphabetically, read their contents and formulates one large AppleEvent that contains the appropriate MIME headers for multipart/x-mixed-replace.
How to Use
So what does the HTTP look like? Simple.
It's a simple variation of <img src="My Gif File">
The syntax is:
<img src="GIFserv.acgi$folder">
where folder is in the same directory with the GIFserv application. GIFserv will not recurse folders, it will only read in all the GIF files on the top level of the folder specified.
But if you are concerned with filling your HTTP directory with folders, GIFserv does support Macintosh relative pathnames like ":folder:subfolder"
I have included an example that duplicates the functionality of the Netscape Mozilla animation so you can quickly get an idea of how this works. Enjoy.
Performance Note/Side Effects
GIFserv is designed to run as fast as possible, running accelerated for the PowerMac and using the asynchronous common gateway interface. In doing so, it keeps the information for the last folder read in memory in case it is asked for repeatedly. If you change the contents of a folder and GIFserv does not reflect that change, quit it and restart it or ask for a different folder so that previous contents are dumped and re-read when you select the changed folder again.
Cost
This copyrighted work is free, but I retain all rights associated with it. This is a derivative work based on John O'Fallon's Responder. I have tested GIFserv with MacHTTP 2.0.1 and -tm versions and believe it is "error-free", but I do not give technical support for GIFserv. Use at your own risk. It may be distributed on online services, BBSs, CDs, etc. If you do something interesting with it, send me some mail.
Additional Info
From the Netscape 1.1b1 demo page they give you the ANSI C source code for combining multiple GIFs into the result of the CGI with a multipart MIME header: